const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin

// 判断环境是什么
if (process.env.NODE_ENV === 'production') {
  // 生产环境
  module.exports = {
    devtool: 'none',
    plugins: [new BundleAnalyzerPlugin()],
    externals: {
      vue: 'Vue',
      vuex: 'Vuex',
      axios: 'axios',
      'vue-router': 'VueRouter'
    }
  }
} else {
  module.exports = {}
}
